namespace FluentBinding.WinForms
{
    /// <summary>
    /// Represents extention interface for specification of the convertion between root entity and
    /// property which will be used in data binding
    /// 
    /// Can be used to encapsulate the logic of selecting\initializing data-bound property in the entity
    /// </summary>
    /// <typeparam name="E">Type of the root entity</typeparam>
    /// <typeparam name="P">Type of the property in the entity</typeparam>
    public interface IPropertyConvertor<E, P>
    {
        #region Public methods

        void Initialize(E entity, P value);
        P Select(E entity);

        #endregion
    }
}